<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../../header.jsp"%>
<script type="text/javascript">

$(document).ready(function() {
	$("#tabs").tab("show");
	$('a[data-toggle="tab"]').on('shown', function (e) {
		var actived = $(e.target).attr("href");
		if (actived == "#bindUserPanel") {
			if ($(e.target).data("bindUserLoaded")) {
				return;
			}
			$(e.target).data("bindUserLoaded",true);
			initBindUser();
		}
		else if (actived == "#menuPermissionPanel") {
			if ($(e.target).data("menuPermissionLoaded")) {
				return;
			}
			$(e.target).data("menuPermissionLoaded",true);
			initMenuPermission();
		}
		
	});

	initDetail();
});

</script>

<div class="border bg">

<div class="page-header">
<h2>角色<small> - ${data.name}</small></h2>
<div class="cms_toolbar"><a href="./" class="btn"><i class="icon-list"></i>返回</a></div>
</div>

<div id="tabs">

<ul class="nav nav-tabs">
<li class="active"><a href="#detailPanel" data-toggle="tab">基本信息</a>
</li>
<li><a href="#bindUserPanel" data-toggle="tab">绑定用户<small id="bindedUserListSummary"></small></a>
</li>
<li><a href="#menuPermissionPanel" data-toggle="tab">菜单权限</a>
</li>
</ul>

<div class="tab-content">

<div id="detailPanel" class="tab-pane fade in active">
<jsp:include page="edit.detail.jsp">
	<jsp:param name="action" value="edit"/>
</jsp:include>
</div>

<div id="bindUserPanel" class="tab-pane fade">
<%@ include file="edit.bind.user.jsp" %>
</div>

<div id="menuPermissionPanel" class="tab-pane fade">
	<jsp:include page="edit.menu.permission.jsp"/>
</div>
</div>
</div>

</div>

<%@ include file="../../../footer.jsp"%>